<extend name="public@base5"/>
<block name="main">
    <div class="wrap js-check-wrap">
        <form action="" method="post">
            <php>
                $types = [
                '1'=>lang('System Hook'),
                '2'=>lang('App Hook'),
                '3'=>lang('Theme Hook'),
                '4'=>lang('Admin Theme Hook')
                ];
            </php>
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th>{:lang('NAME')}</th>
                    <th>{:lang('Type')}</th>
                    <th>{:lang('Whether to execute multiple plugins')}</th>
                    <th>{:lang('Description')}</th>
                    <th width="70">{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="hooks" item="vo">
                    <tr>
                        <td><b>{$vo.name}</b>:<span class="badge text-bg-success">{$vo.hook}</span></td>
                        <td>{$types[$vo.type]}</td>
                        <td>{$vo.once?lang('First plugin'):lang('Multiple plugins')}</td>
                        <td>{$vo.description}</td>
                        <td>
                            <a class="btn btn-xs btn-primary"
                               href="javascript:parent.openIframeLayer('{:url('Hook/plugins',['hook'=>$vo['hook']])}','{:lang('Hook x plugin management')}',{});"
                               title="{:lang('Set execution order')}" data-toggle="tooltip">
                                <i class="fa fa-sort-numeric-asc fa-fw"></i>
                            </a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
        </form>
    </div>
</block>
